﻿using System.Windows.Controls;
using System.Windows.Documents;

namespace Open.Infrastructure
{
    public static class DocumentViewerExtend
    {
        public static void PrintwithoutDialog(this DocumentViewer viewer, FixedDocument fixedDoc)
        {
            PrintDialog pDialog = new PrintDialog();
            pDialog.PageRangeSelection = PageRangeSelection.AllPages;
            pDialog.UserPageRangeEnabled = false;
            pDialog.PrintDocument(fixedDoc.DocumentPaginator, "报告");
        }
    }
}
